package myclass;
import java.sql.*;

import bean.ConDbBean;

public class Place {
	private ResultSet rs;
	private ConDbBean conn;
	private String p_id="";
	private String p_name="";
	
	public Place(){
		this.p_id="";
		this.p_name="";
	}
	public void setPlace(String pid){
		this.conn = new ConDbBean();
		String sql="select * from PLACE WHERE P_ID='"+pid+"'";
		rs = conn.executeQuery(sql);
		try{
			rs.next();
			this.p_id=rs.getString("P_ID");
			this.p_name=rs.getString("P_NAME");
			rs.close();
		}
        catch(SQLException e) { 
            e.printStackTrace(); 
        }
	}
	public String getPName(){
		return this.p_name;
	}
}
